package com.clickpaas.materialsprocurement.common.Response;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class ResponseResult<T> {

    /**
     * 返回代码
     */
    Integer code;

    /**
     * 返回信息
     */
    String message;

    /**
     * 泛型数据
     */
    T data;

    public ResponseResult(ResultCode resultCode, T data) {
        this.code = resultCode.code();
        this.message = resultCode.message();
        this.data = data;
    }

}